package com.tbit.uqbike.service.business.impl;

import com.tbit.uqbike.object.pojo.SmsLog;
import com.tbit.uqbike.service.business.AccountService;
import com.tbit.uqbike.service.business.SmsLogService;
import com.tbit.uqbike.webmanager.dao.log.SmsLogDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("smsLogService")
public class SmsLogServiceImpl implements SmsLogService {
    @Autowired
    private SmsLogDao smsLogDao;
    @Autowired
    private AccountService accountService;

    @Override
    public void insert(SmsLog smsLog) {
        smsLogDao.insert(smsLog);
    }

    @Override
    public List<SmsLog> findByphone(Integer accountId, String phone) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("accountId", accountId);
        params.put("phone", phone);
        return smsLogDao.findByphone(params);
    }
}